﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.RB
{
    class Class3
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period  % 2 == 0)
            {
                da.Value = ppa.Amount * 0.10;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Age==75)
            {
                IPolicy ep = ppa.SchemePeriodActing.SchemeActing.Scheme.GetPolicy("人保_福禄双喜提前给付重大疾病保险_附");

                IPolicyPeriodActing eppa = ppa.SchemePeriodActing.GetPolicyPeriodActiing("人保_福禄双喜提前给付重大疾病保险_附");
                double x = eppa == null ? 0 : eppa.GetDutyTotalValue("重大疾病保险");

                double v = ppa.TotalFee - x > 0 ? ppa.TotalFee - x : 0;

                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Age == 75)
            {
                da.Value = ppa.Amount;
                ppa.IsCurrentFinish = true;
            }
        }
    }
}
